Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check host_maps and host_data in the GPU transformations #1701

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ThrudPrimrose
Copy link
Collaborator

No description provided.

@ThrudPrimrose ThrudPrimrose marked this pull request as ready for review October 23, 2024 09:25
dace/sdfg/sdfg.py Outdated Show resolved Hide resolved
@ThrudPrimrose ThrudPrimrose removed the request for review from alexnick83 October 25, 2024 11:44
def _output_or_input_is_marked_host(self, state, entry_node):
if (self.host_data is None or self.host_data == []) and (self.host_maps is None or self.host_maps == []):
return False
marked_accesses = [e.data.data for e in state.in_edges(entry_node) + state.out_edges(state.exit_node(entry_node))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't checking memlet paths and adding the src and destination data make more sense here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, I am considering issues similar to those identified in #1708

for state in sdfg.nodes():
for node in state.nodes():
if isinstance(node, nodes.EntryNode) and node.guid in self.host_maps:
accesses = {e.data.data for e in state.in_edges(node) + state.out_edges(state.exit_node(node))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

@@ -312,11 +338,13 @@ def apply(self, _, sdfg: sd.SDFG):
for node in state.nodes():
if sdict[node] is None:
if isinstance(node, (nodes.LibraryNode, nodes.NestedSDFG)):
node.schedule = dtypes.ScheduleType.GPU_Default
gpu_nodes.add((state, node))
if node.guid not in self.host_maps and not self._output_or_input_is_marked_host(state, node):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the node is a LibraryNode or NestedSDFG, why would its ID be in host_maps? A documentation line clarifying that host_maps can also be used for the above SDFG elements suffices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants